<template>
  <div>
    <h2>博客详情</h2>
    <h3>{{$route.params.article_id}}</h3>
    <v-md-preview :text="mdText"></v-md-preview>
  </div>
</template>

<script>
import * as blogRequest from '@/network/blog'
export default {
  name: "BlogArticleDetail",
  data(){
    return {
      currentArticleId: null,
      mdText: ""
    }
  },
  activated() {
    console.log("activated");
    this.currentArticleId = this.$route.params.article_id;
    blogRequest.getArticle(this.currentArticleId)
        .then(res=>{
          this.mdText = res['article_content'];
        })
  }
}
</script>

<style scoped>

</style>
